<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>

	<head>
		<meta name="renderer" content="webkit|ie-comp|ie-stand">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <meta name="author" content="order by dede58.com"/>
		<meta http-equiv="Cache-Control" content="no-siteapp" />
		<title>详情</title>
		<meta name="viewport" content="width=device-width,initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
		<meta http-equiv="Cache-Control" content="no-siteapp">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="mobile-web-app-capable" content="yes">
		<meta name="format-detection" content="telephone=no">
		<meta name="keywords" content="">
		<meta name="description" content="">
		<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/page.css" />
		<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/base.css" />
		<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/common.css" />
		<script src="${pageContext.request.contextPath}/js/jquery-1.8.3.min.js" type="text/javascript"></script>
		<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery.SuperSlide.2.1.js"></script>
		<script src="${pageContext.request.contextPath}/js/common.js"></script>
		<script>  
			$(function(){
				var t = $("#text_box");
				var ladder="${auctionInfo.auctionLadder}";
				var nowprice="${auctionInfo.auctionNowPrice}";
				t.val(parseFloat(nowprice)+parseFloat(ladder));
				if(parseFloat(nowprice)>=parseFloat("${auctionInfo.auctionOnePrice}"))
					$("#goumai").hide();
			    $("#add").click(function(){     
			        t.val(parseFloat(t.val())+parseFloat(ladder));
			    })
			    $("#min").click(function(){  
			          
			        if(parseFloat(t.val())>parseFloat(nowprice)+parseFloat(ladder)){   
			        	t.val(parseFloat(t.val())-parseFloat(ladder));   
			        }
			    }) 
			    $("#auction").click(function(){
					$("form").submit();
				})
			    
			})

			
			</script>
	</head>
	<body>

		<jsp:include page="title.jsp" flush="true" />
		<!--navbar star-->
		<div class="navbar clearfix">
			<div class="content clearfix">
				<ul>
					<li ><a href="${pageContext.request.contextPath}/index">首页</a></li>
					<li ><a href="${pageContext.request.contextPath}/AuctionInfo/list2">预展</a></li>
					<li class="cur"><a href="${pageContext.request.contextPath}/AuctionInfo/list">正在热拍</a></li>
					<li><a href="${pageContext.request.contextPath}/AuctionInfo/list3">最近成交</a></li>
					
				</ul>
			</div>
		</div>
		<!--navbar end-->

		<!--Main-wrap-->
		<div class="main-wrap graybgtwo pt40 pb40">
			<div class="wrapper">
				<!--Main-pro-info-->
				<div class="main-pro-info white-box  clearfix">
					<div class="fangda clearfix fl">
						<div id="showbox">
						  <img src="${pageContext.request.contextPath}/upload/14.jpg" width="1000" height="1000" />
						  <img src="${pageContext.request.contextPath}/upload/14.jpg" width="1000" height="1000" />
						  <img src="${pageContext.request.contextPath}/upload/14.jpg" width="1000" height="1000" />
						  <img src="${pageContext.request.contextPath}/upload/14.jpg" width="1000" height="1000" />
						  <img src="${pageContext.request.contextPath}/upload/14.jpg" width="1000" height="1000" />
						  <img src="${pageContext.request.contextPath}/upload/14.jpg" width="1000" height="1000" />
						  <img src="${pageContext.request.contextPath}/upload/14.jpg" width="1000" height="1000" />
						</div><!--展示图片盒子-->
						<div id="showsum"></div><!--展示图片里边-->
						<p class="showpage">
						  <a href="javascript:void(0);" id="showlast"> < </a>
						  <a href="javascript:void(0);" id="shownext"> > </a>
						</p>
						
						</div>
					<!--产品信息介绍-->
					<div class="fr pro-intro">
						<div class="pb20 line-bot">
							<h3 class="fs26 darkblack lh50 ellipsis">${auctionInfo.art.artName}</h3>
							<p class="fs14 lh20 over2">${auctionInfo.art.artIntroduce}</p>
							<p class="price pt10 clearfix"><strong class="fl red fs40">当前价:${auctionInfo.auctionNowPrice}</strong><em class="fl white ml20 lh20 mt20">已售：2000件</em></p>
						</div>
						<div class="pro-ctent clearfix">
							<ul>
								<li><span>艺 术 家 ：</span>张文标</li>
								<li><span>尺      寸 ：</span>${auctionInfo.art.artSize}</li>
								<li><span>起步价 ：</span>${auctionInfo.auctionStartPrice}</li>
								<li><span>竞价阶梯 ：</span>${auctionInfo.auctionLadder}</li>
								<li><span>一口价：</span>${auctionInfo.auctionOnePrice}</li>
								<li><span>剩余数量 ：</span>${auctionInfo.art.artSum}</li>
								<li><span>剩余数量 ：</span>${auctionInfo.art.artSum}</li>
								<li><span>剩余数量 ：</span>${auctionInfo.art.artSum}</li>
								<li style="width:100% "><strong class="fl red fs40"><span id="LeftTime" style="color: red" ></span></strong></li>						
								<script>
function FreshTime()
{
	var time="${auctionInfo.auctionEndTime}";//结束时间
    var time2=time.replace(/-/g, '/');
    var endtime=new Date(time2)
    var nowtime = new Date();//当前时间
    var lefttime=parseInt((endtime.getTime()-nowtime.getTime())/1000); 
    d=parseInt(lefttime/(3600*24));
    h=parseInt((lefttime/3600)%24);
    m=parseInt((lefttime/60)%60);
    s=parseInt(lefttime%60);
 
    document.getElementById("LeftTime").innerHTML="还剩" + d+"天"+h+"小时"+m+"分"+s+"秒";
    if(lefttime<=0){
        document.getElementById("LeftTime").innerHTML="团购已结束";
        clearInterval(sh);
    }
}
    FreshTime();
    var sh;
    sh=setInterval(FreshTime,1000);
</script>
							</ul>
						</div>
						<form action="${pageContext.request.contextPath}/Auction/addAuction" method="post" id="form">
						<div class="pt10">
							<div class="p-count fs14 mt20 clearfix" id="chujia">
								<label class="fl lh40 darkblack" style="width: 80px">我的出价：</label>
								<p class="fl count ml10 clearfix">
									<a id="min" class="fl fs30 reduction">-</a>
									<input name="auctionInfoId" type="hidden" value="${auctionInfo.auctionInfoId}" >
									<input id="text_box" type="text" value="${auctionInfo.auctionNowPrice}" class="fl fs16" readonly="readonly" placeholder="1" name="auctionPrice">
									<a id="add" class="fl fs30 add">+</a>
								</p>
							</div>
							<div class="but-box mt30">
								<input id="auction" type="button" class="fl orange-but radius3" value="立刻出价">
								<input id="goumai" type="button" class="fl ml20 orange-but gray-but radius3" onclick="window.location.href='${pageContext.request.contextPath}/Order/getAddress?auctionInfoId=${auctionInfo.auctionInfoId}&&sign=1'" value="一口价">
							</div>
						</div>
						</form>
					</div>
					<!--/end-->
				</div>
				<!--/end-->
				<div class="mt20 clearfix">
					<div class="fl pro-likes white-box">
						<div class="title"><strong class="fs16 white">竞拍记录</strong></div>
						<ul class="likelist">
						<c:choose>
							<c:when test="${!empty auctionInfo.auction}">
								<c:forEach items="${auctionInfo.auction}" var="a">
								<li>
									<strong class="full-db tit darkblack ellipsis">出价人ID:${a.userId}</strong>
									<strong class="full-db red">出价金额:<em class="fs12">¥</em>${a.auctionPrice}</strong>
									<strong class="full-db tit darkblack ellipsis">出价时间:${a.auctionTime}</strong>
								</li>
								</c:forEach>
							</c:when>
							<c:when test="${empty auctionInfo.auction}">
								<li>
									<strong class="full-db tit darkblack ellipsis">暂无数据</strong>
								</li>
						   </c:when>
						</c:choose>
						</ul>
					</div>
					
					<div class="pro-detail fr box-s">
						<div class="tab-hd box-s">
								<ul class="tab-nav clearfix">
								  <li class="fs16 box-s">商品详情</li>
								  <li class="fs16 box-s">商品咨询</li>
								</ul>
						</div>
						<div class="tab-bd">
							<div class="tab-pal">
								<p><img src="${pageContext.request.contextPath}/upload/zuopin.jpg" alt="" /></p>
							</div>
							<div class="tab-pal">
								<div class="pro-zixun clearfix">
									<p class="bt">我要咨询：</p>
									<textarea name="" rows="5" cols="" placeholder="请输入要咨询内容"></textarea>
									<p class="tijiao"><a href="#" class="ra3">提交</a></p>
								</div>
							</div>
						</div>
					</div>

				</div>

			</div>

		</div>
		<!--/end-->
		<jsp:include page="foot.jsp" flush="true" />

	</body>
	<script src="${pageContext.request.contextPath}/js/other.js" type="text/javascript" ></script>
</html>